﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vit.Web.Validation
{
    public class ValidationState
    {
        private List<ValidationError> errors;

        public ValidationState()
        {
            errors = new List<ValidationError>();
        }

        public List<ValidationError> Errors
        {
            get { return errors; }
        }

        public bool IsValid
        {
            get
            {
                return errors == null || errors.Count <= 0;
            }
        }
    }
}
